add_library(MyLib MyLib.cxx)
add_library(MyDLL SHARED MyLib.cxx)
add_executable(MyExe MyMain.cxx) 
Example project using Boost:
cmake_minimum_required(VERSION 2.6) 
project(MyProject) 
find_package(Boost REQUIRED thread signals) 
include_directories(${Boost_INCLUDE_DIRS}) 
add_executable(MyExe MyProjectMain.cxx) 
target_link_libraries(MyExe ${Boost_LIBRARIES})   # Bagimlilik 


